package cn.online.taxi.common.utils;

import java.util.Random;

/**
 * @Author BinBini
 * @Date 2021/4/21 21:08
 * @Version 1.0
 */
public class RandomNumUtil {

    /**
     *
     * @param numMin 最小数
     * @param lenMax 长度
     * @return
     */
    public static String getNumber(int numMin, int lenMax) {
        String result = "";
        String[] list = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
        Random random = new Random();
        for(int i = 0; i < lenMax; i++) {
            int index = random.nextInt(10);
            result += list[index];
        }
        return result;
    }
}
